﻿<Window x:Class="AvCapWPF.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:l="clr-namespace:AvCapWPF"
    Name="wnd"
    Title="Window1" Height="300" Width="300">
    <Window.Resources>
        <l:ScaleConverter x:Key="conv"/>
    </Window.Resources>
        <Grid>
        <l:CapPlayer x:Name="player"/>
        <HeaderedItemsControl Header="Framerate" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="55">
            <Grid>
                <Rectangle Fill="#55FF0000">
                    <Rectangle.Height>
                        <MultiBinding Converter="{StaticResource conv}">
                            <Binding ElementName="player" Path="Framerate"/>
                            <Binding ElementName="wnd" Path="ActualHeight"/>
                        </MultiBinding>
                    </Rectangle.Height>
                </Rectangle>
                <TextBlock Text="{Binding ElementName=player, Path=Framerate}"/>
            </Grid>
        </HeaderedItemsControl>
        
    </Grid>
</Window>
